Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

310
Visualizações
Chrome Extension "Uncaught Type Error: Cannot read properties of undefined (reading 'query') error". query property there was a mistake

I am trying to develop an extension for chrome. I did the necessary operations in the Process.js file. The codes worked but I got an undefined query error. This error did not prevent the code. There was a problem only in the share part in Google Slides. what do you think is the reason?

The system is working, but how can I prevent that warning?

Please help me.

Share google slides button not working. It works when I remove the plugin.

process.js

chrome.tabs.query({active: true, lastFocusedWindow: true}, tabs => {
    let url = tabs[0].url;
    url = url.replace('//', ';;').replace(/[/]/g, ';');
    let pageTitle = tabs[0].title;
    pageTitle = pageTitle.replaceAll("'", '*');
    pageTitle = pageTitle.replaceAll('"', '**');
    pageTitle = pageTitle.replace('//', '__').replace(/[/_]/g, '_');

});

google Slides and chrome extension image

chrome extension error log image

manifest.json

{
  "name": "DergiPark",
  "description": "This is a DergiPark Product. Powered by DergiPark.",
  "content_scripts": [
    {
      "js": [
        "/js/jquery.min.js",
        "/js/alert_util.js",
        "process.js"
      ],
      "css": [
        "/css/bootstrap.css"
      ],
      "matches": [
        "http://*/*",
        "https://*/*"
      ]
    }
  ],
  "version": "1.0",
  "manifest_version": 3,
  "background": {
    "service_worker": "background.js"
  },
  "icons": {
    "48": "icons/DP-02.png",
    "128": "icons/DP-02.png"
  },
  "action": {
    "default_icon": {
      "16": "icons/DP-02.png",
      "24": "icons/DP-02.png",
      "32": "icons/DP-02.png"
    },
    "default_popup": "popup.html"
  },
  "permissions": [
    "activeTab", "tabs"
  ]
}
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

I tried the whole process by changed. I moved the js codes to background.js and the error was resolved.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda